-- use NeoSolarized
vim.cmd [[colorscheme solarized]]
-- airline settings.
vim.g.airline_theme = 'solarized'
vim.g.airline_solarized_bg = 'dark'
vim.g.airline_powerline_fonts = 1

vim.cmd [[
if !exists('g:airline_symbols')
  let g:airline_symbols = {}
endif
]]

-- TODO: fix
-- if not vim.fn.exists('g:airline_symbols') then
--   vim.g.airline_symbols = {}
-- endif

vim.g.airline_left_sep = ''
vim.g.airline_left_alt_sep = ''
vim.g.airline_right_sep = ''
vim.g.airline_right_alt_sep = ''
vim.g.airline_symbols.branch = ''
vim.g.airline_symbols.readonly = ''
vim.g.airline_symbols.linenr = '␊'
vim.g.airline_symbols.maxlinenr = '㏑'

-- show absolute file path in status line
vim.api.nvim_set_var('airline_section_c', '%<%F%m %#__accent_red#%{airline#util#wrap(airline#parts#readonly(),0)}%#__restore__#')
-- show tab number in tab line
vim.api.nvim_set_var('airline#extensions#tabline#enabled', 1)
vim.api.nvim_set_var('airline#extensions#tabline#tab_nr_type', 1)
vim.api.nvim_set_var('airline#extensions#tabline#formatter', 'default')
vim.api.nvim_set_var('airline#extensions#tabline#left_sep', '')
vim.api.nvim_set_var('airline#extensions#tabline#left_alt_sep', '')
vim.api.nvim_set_var('airline#extensions#tabline#right_sep', '')
vim.api.nvim_set_var('airline#extensions#tabline#right_alt_sep', '')
vim.api.nvim_set_var('airline#extensions#bufferline#enabled', 1)

-- rainbow
vim.g.rainbow_active = 1
vim.g.rainbow_conf = {
  separately = {
    nerdtree = 0
  }
}